<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Aquamat: Plik źródłowy top_off.h (r58/r57)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Wygenerowano przez Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="pages.html"><span>Dodatkowe&nbsp;strony</span></a></li>
      <li><a href="annotated.html"><span>Struktury&nbsp;Danych</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<h1>top_off.h (r58/r57)</h1><a href="top__off_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Aquamat - Sterownik akwariowy Open Source</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2009 Wojciech Todryk (wojciech@todryk.pl)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00018"></a>00018 <span class="comment">    </span>
<a name="l00019"></a>00019 <span class="comment">    $Id$</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a>00021 
<a name="l00026"></a><a class="code" href="top__off_8h.html#a645d9101ecd0e4ab29a4fa7e8e5581e6">00026</a> <span class="preprocessor">#define TOP_OFF_MAXSUMP_PORT C</span>
<a name="l00027"></a><a class="code" href="top__off_8h.html#ae4ddba165c8ebde7e3da59e6b0c22320">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MAXSUMP_PIN PORT5</span>
<a name="l00028"></a><a class="code" href="top__off_8h.html#a67c5ced1972f41e85968f89b9006ccd5">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MAXSUMP_PORTOUT PORT(TOP_OFF_MAXSUMP_PORT)</span>
<a name="l00029"></a><a class="code" href="top__off_8h.html#a0db915a5443b72a862c3513ef29b2619">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MAXSUMP_PORTIN  pin(TOP_OFF_MAXSUMP_PORT)</span>
<a name="l00030"></a><a class="code" href="top__off_8h.html#aec6828b9895356684328f3906645038f">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MAXSUMP_DDR     DDR(TOP_OFF_MAXSUMP_PORT)</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a><a class="code" href="top__off_8h.html#a10c8f513f9806e0ee628a554dd9874bd">00032</a> <span class="preprocessor">#define TOP_OFF_MINSUMP_PORT C</span>
<a name="l00033"></a><a class="code" href="top__off_8h.html#a4a59a8ac93631350369d4f277239e91b">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINSUMP_PIN PORT4</span>
<a name="l00034"></a><a class="code" href="top__off_8h.html#a3492042bb246a45d11ace94e5629c89e">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINSUMP_PORTOUT    PORT(TOP_OFF_MINSUMP_PORT)</span>
<a name="l00035"></a><a class="code" href="top__off_8h.html#ab19727a69a777a67f46e6b4038d610d7">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINSUMP_PORTIN     pin(TOP_OFF_MINSUMP_PORT)</span>
<a name="l00036"></a><a class="code" href="top__off_8h.html#a1519fc13b8328dc6bb0be2495e2045d5">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINSUMP_DDR        DDR(TOP_OFF_MINSUMP_PORT)</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a><a class="code" href="top__off_8h.html#acc74c3026514bf3721d32dedb2e293d9">00038</a> <span class="preprocessor">#define TOP_OFF_MINRO_PORT C</span>
<a name="l00039"></a><a class="code" href="top__off_8h.html#a23205f004c256ca7d542632ce212a5c5">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINRO_PIN PORT3</span>
<a name="l00040"></a><a class="code" href="top__off_8h.html#a97356128623620c16b3ed5b8046260e8">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINRO_PORTOUT    PORT(TOP_OFF_MINRO_PORT)</span>
<a name="l00041"></a><a class="code" href="top__off_8h.html#aa7c161551d39f1cf160c6999a9f62728">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINRO_PORTIN     pin(TOP_OFF_MINRO_PORT)</span>
<a name="l00042"></a><a class="code" href="top__off_8h.html#ab9d20f1e5d381c7983179d4da5a3dcd2">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_MINRO_DDR        DDR(TOP_OFF_MINRO_PORT)</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a><a class="code" href="top__off_8h.html#a966a397361096d814621811d995be7b4">00044</a> <span class="preprocessor">#define TOP_OFF_BLOCK_PORT C</span>
<a name="l00045"></a><a class="code" href="top__off_8h.html#a2347b11d0834bb47f12f04c7eb021cbd">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_BLOCK_PIN PORT2</span>
<a name="l00046"></a><a class="code" href="top__off_8h.html#a592e504dfea9b9a5ebe41e8865b5c928">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_BLOCK_PORTOUT    PORT(TOP_OFF_BLOCK_PORT)</span>
<a name="l00047"></a><a class="code" href="top__off_8h.html#aaebc3e12afd7fef39a9ca2f070d427e2">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_BLOCK_PORTIN     pin(TOP_OFF_BLOCK_PORT)</span>
<a name="l00048"></a><a class="code" href="top__off_8h.html#afa1b8f30a7bb639193493a8230da058d">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define TOP_OFF_BLOCK_DDR        DDR(TOP_OFF_BLOCK_PORT)</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a><a class="code" href="top__off_8h.html#add6e4e9160e66c78705d9741868ebc11">00050</a> <span class="preprocessor">#define TOP_OFF_PIN_MASK (_BV(TOP_OFF_MAXSUMP_PIN)|_BV(TOP_OFF_MINSUMP_PIN)|_BV(TOP_OFF_MINRO_PIN)|_BV(TOP_OFF_BLOCK_PIN))</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a><a class="code" href="top__off_8h.html#ac520e4be17c4dc512f617e07dc9a6353">00052</a> <span class="preprocessor">#define TOP_OFF_FLAGS_MASK (_BV(TOP_OFF_MAX_SUMP)|_BV(TOP_OFF_MIN_SUMP)|_BV(TOP_OFF_MIN_RO)|_BV(TOP_OFF_BLOCK_BY_PIN))</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a><a class="code" href="top__off_8h.html#adc5c70fe5d2c5f173d3cab7508faf81c">00054</a> <span class="preprocessor">#define TOPSSF(x) (top_off.flags |= _BV(x))</span>
<a name="l00055"></a><a class="code" href="top__off_8h.html#a1e1be498cf8cd5cfc67eae5df3d8771b">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define TOPCSF(x) (top_off.flags &amp;= ~_BV(x))</span>
<a name="l00056"></a><a class="code" href="top__off_8h.html#a9d650daa8bbe8e4b2a728bb408d2ad1d">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define TOPSF(x) (top_off.flags &amp; _BV(x))</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span>
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#a1d360a830a49600a348183cf58599ffe">top_off_process</a>();
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#a794f4a6592b18d90adf7c67754f12763">top_off_init</a>(<span class="keywordtype">void</span>);
<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#a743081d331bb2971b88c3bc6d98c65a7">top_off_unblock_run</a>(<span class="keywordtype">void</span>);
<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#ae30b85c2efc165cb0bb295298abf9612">top_off_status_display</a>(<span class="keywordtype">void</span>);
<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#a2e0fe9dc427bb4bb5534aea55615623f">top_off_on</a>(<span class="keywordtype">void</span>);
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#a4b81666e534c9874d3efcdadff93c8f5">top_off_off</a>(<span class="keywordtype">void</span>);
<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="top__off_8c.html#aa5a62c54928a77b58351d23c9a8dc7f8">top_off_check_time</a>(<span class="keywordtype">void</span>);
<a name="l00065"></a>00065 
<a name="l00069"></a><a class="code" href="structTOP__OFF.html">00069</a> <span class="keyword">struct </span><a class="code" href="structTOP__OFF.html" title="Struktura przechowywująca dane o automatycznej dolewce.">TOP_OFF</a> {
<a name="l00099"></a><a class="code" href="structTOP__OFF.html#ac901fc88ae8bb16b0a4c7ca315f09e16">00099</a>     uint8_t <a class="code" href="structTOP__OFF.html#ac901fc88ae8bb16b0a4c7ca315f09e16">flags</a>;
<a name="l00100"></a><a class="code" href="structTOP__OFF.html#a3ce803e3d7ba8499ea3157ed32b28aee">00100</a>     uint8_t <a class="code" href="structTOP__OFF.html#a3ce803e3d7ba8499ea3157ed32b28aee">out</a>;    
<a name="l00101"></a><a class="code" href="structTOP__OFF.html#a13a7f06fc8f8edf6022950374fdcbd6b">00101</a>     uint8_t <a class="code" href="structTOP__OFF.html#a13a7f06fc8f8edf6022950374fdcbd6b">run_time</a>; 
<a name="l00102"></a><a class="code" href="structTOP__OFF.html#ac74dd9af1c95c2b9a7beb6d9601b27d7">00102</a>     uint8_t <a class="code" href="structTOP__OFF.html#ac74dd9af1c95c2b9a7beb6d9601b27d7">max_run</a>;    
<a name="l00103"></a>00103 };
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 <span class="keyword">extern</span> <span class="keyword">struct </span><a class="code" href="structTOP__OFF.html" title="Struktura przechowywująca dane o automatycznej dolewce.">TOP_OFF</a> <a class="code" href="top__off_8c.html#a7aaf60666b3c3620441c847b5a6c1503">top_off</a>;
</pre></div></div>
<hr size="1">
<div style="text-align: center;">
<small>Projekt udostępniony jest na zasadach Open Source. Zapoznaj się z warunkami licencji w pliku COPYING znajdujacym się w katalogu głównym.	</small>
</div>

<hr size="1">
<div style="text-align: center;">
Aquamat - sterownik akwarystyczny Open Source
<br/>
Copyright (C) 2009  <a href="http://todryk.pl">Wojciech Todryk</a> (wojciech(at)todryk(dot)pl)
</div>

<div style="text-align: right;">
<small>Dokumentację wygenerowano za pomocą programu&nbsp;</small>
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
<small> wersja 1.6.1 (Fri Apr 23 22:48:16 2010)&nbsp;</small>
</div>
